﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"
    xmlns:MeasureTools="clr-namespace:DeepEarth.BingMapsToolkit.Client.Controls">

    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/DeepEarth.BingMapsToolkit.Client.Common;component/Resources/CommonStyles.xaml" />
    </ResourceDictionary.MergedDictionaries>

    <Style TargetType="MeasureTools:MeasureTools">
        <Setter Property="Foreground" Value="White"/>
        <Setter Property="FontSize" Value="14"/>
        <Setter Property="Template">
            <Setter.Value>

                <ControlTemplate TargetType="MeasureTools:MeasureTools">
                    <Grid x:Name="LayoutRoot" Width="Auto" Height="75" Opacity="0.82">
                        <vsm:VisualStateManager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CommonStates">
                                <vsm:VisualStateGroup.Transitions>
                                    <vsm:VisualTransition GeneratedDuration="00:00:00.3000000"/>
                                </vsm:VisualStateGroup.Transitions>
                                <vsm:VisualState x:Name="MouseOver">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="LayoutRoot" Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Normal">
                                    <Storyboard/>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>

                        <Border HorizontalAlignment="Stretch" Margin="5,0,5,0" CornerRadius="8" Background="#FF2B2B2B" BorderBrush="#FF000000" BorderThickness="1,1,1,1">
                            <Grid>
                                <Grid Margin="0,0,30,0">
                                    <StackPanel Orientation="Vertical">
                                        <StackPanel Orientation="Horizontal" Visibility="Collapsed">
                                            <Button x:Name="PART_DoneButton" Content="Klar" HorizontalAlignment="Right" Width="50" Height="25" Margin="12,7,0,0" Style="{StaticResource ButtonStyle}" Visibility="Collapsed" />
                                        </StackPanel>
                                        <StackPanel Orientation="Vertical">
                                            <StackPanel Orientation="Horizontal">
                                                <ToggleButton x:Name="PART_LineStringToggleButton" VerticalAlignment="Center" HorizontalAlignment="Left" Width="25" Margin="8,8,0,0" Style="{StaticResource ToggleButtonStyle}">
                                                    <Image Source="/DeepEarth.BingMapsToolkit.Client.Controls.MeasureTools;component/Images/Line.png" Stretch="Uniform"/>
                                                </ToggleButton>
                                                <TextBlock x:Name="PART_LengthTextBlock" 
                                                       Text="LengthBlock" 
                                                       HorizontalAlignment="Left"
                                                           VerticalAlignment="Center"
                                                       TextAlignment="Right" 
                                                       Foreground="{TemplateBinding Foreground}" 
                                                       FontSize="{TemplateBinding FontSize}" 
                                                       Margin="7,0,7,0"/>
                                            </StackPanel>
                                            <StackPanel Orientation="Horizontal">
                                                <ToggleButton x:Name="PART_PolygonToggleButton" VerticalAlignment="Center" HorizontalAlignment="Center" Width="25" Margin="8,8,0,0" Style="{StaticResource ToggleButtonStyle}">
                                                    <Image Source="/DeepEarth.BingMapsToolkit.Client.Controls.MeasureTools;component/Images/Polygon.png" Stretch="Uniform"/>
                                                </ToggleButton>
                                                <TextBlock x:Name="PART_AreaTextBlock" 
                                                       Text="AreaBlock" 
                                                       HorizontalAlignment="Left"
                                                           VerticalAlignment="Center"
                                                       TextAlignment="Right" 
                                                       Foreground="{TemplateBinding Foreground}" 
                                                       FontSize="{TemplateBinding FontSize}"
                                                       Margin="7,0,7,0"/>
                                            </StackPanel>
                                        </StackPanel>
                                    </StackPanel>
                                </Grid>
                            </Grid>
                        </Border>

                        <!--<ContentControl Content="{StaticResource EndPath}" HorizontalAlignment="Left" RenderTransformOrigin="0.5,0.5" ContentTemplate="{StaticResource EndPath}">
                            <ContentControl.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="1"/>
                                    <SkewTransform/>
                                    <RotateTransform Angle="180"/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </ContentControl.RenderTransform>
                        </ContentControl>

                        <ContentControl Content="{StaticResource EndPath}" HorizontalAlignment="Right" RenderTransformOrigin="0.5,0.5" ContentTemplate="{StaticResource EndPath}">
                            <ContentControl.RenderTransform>
                                <TransformGroup>
                                    <ScaleTransform ScaleX="1"/>
                                    <SkewTransform/>
                                    <RotateTransform Angle="0"/>
                                    <TranslateTransform/>
                                </TransformGroup>
                            </ContentControl.RenderTransform>
                        </ContentControl>-->
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>

